package cn.com.demo.tp01.constomer;

import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(bindings = @QueueBinding(
        value = @Queue(value = "demo.tp01.fanout",autoDelete = "false"),
        exchange = @Exchange(value = "demo.fanout",type = ExchangeTypes.FANOUT)

))


public class FanOutConstomer {
    @RabbitHandler
    public void receive(String message){
        System.out.println("FanOutConstomer Received:" + message);
    }
}
